home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / 4dos / 4dos_btm.zip / DESC.BTM < prev    next >
Text File  |  1992-04-15  |  10KB  |  388 lines

  1. : ┌─────────────────────────────────────────────────────────────────────────┐
  2. : │                                     4  4 DDD   OO   SSS    4  4   00    │
  3. : │ DESCBTM  Version 1.0   for          4  4 D  D O  O S       4  4  0 o0   │
  4. : │                                     4444 D  D O  O SSSS    4444  0o 0   │
  5. : │ (C) 1992 FMMO Publications             4 D  D O  O    S       4  0  0   │
  6. : │          Informatiques Enr.            4 DDD   OO  SSS        4 . 00    │
  7. : │                                                                         │
  8. : │ [Non-Registered Version] 04-11-92                                       │
  9. : ├─────────────────────────────────────────────────────────────────────────┤
  10. : │4DOS is a trademark of JP Software P.O. Box 1470 East Arlington, MA 02174│
  11. : └─────────────────────────────────────────────────────────────────────────┘
  12.  
  13. if  "%cwd" ne ""   goto not4dos
  14. if  %_4ver lt 4.0  goto notv40
  15.  
  16. cls
  17. echo  
  18. echo  
  19. echo  
  20. scrput 2 1 bri whi on blu working ...
  21.  
  22. setlocal
  23. set totalenv=%_ENV
  24.  
  25. set /r d:\wkg\dld\tmp\desc.ini
  26. echo %_? > error.lst
  27.  
  28. iff  %@line[error.lst, 0] eq 2  then
  29.   del error.lst >& nul
  30.   echo  Not enough environment or alias space :-(
  31.   echo.
  32.   beep 310 10
  33.   beep 210 10
  34.   echo  You would have only %_ENV bytes of free environment.
  35.   text
  36.  
  37.   This is not enough to run DESCBTM.
  38.  
  39.   Solution :  a) run DESCBTM under a 4DOS /e=4096 shell;
  40.               b) look in the main screen how much bytes of environment
  41.                  DESCBTM needs;
  42.               c) Add this amount to your 4DOS.INI file;
  43.               d) Refer to 4DOS.DOC for more information on environment
  44.                  memory.
  45.  
  46.   endtext
  47.   endlocal
  48.   cancel
  49. endiff
  50.  
  51. iff  "%configured" ne "yes"  then
  52.   del error.lst >& nul
  53.   echo.
  54.   beep 310 10
  55.   beep 210 10
  56.   set error=%@search[desc.ini] >& nul
  57.   iff "%error" ne "" then
  58.     text
  59.  
  60.     DESC.INI is not properly configured to fit your system.
  61.  
  62.     Solution : a) Read DESCBTM.DOC.
  63.  
  64.                It is crucial for the well behavior of this BTM file that
  65.                the variables in DESCVAR.LST be configured to fit your
  66.                system.  If strange stuff keeps happening, the error is most
  67.                probably in the configuration of this file's variables.
  68.     endtext
  69.   else
  70.     text
  71.  
  72.     DESC.INI is not in your path or its path is not specified in DESCVAR.LST.
  73.  
  74.   Solution : a) Move all DESCBTM files in a directory that is included
  75.                 in your path statement.
  76.              b) Edit the DESCBTM file and change the %@search command,
  77.                 so it would point to the path of DESC.INI.
  78.              c) Read 4DOS.DOC for more information on the path
  79.                 statement
  80.  
  81.     endtext
  82.   endiff
  83.   endlocal
  84.   cancel
  85. endiff
  86.  
  87. del /y error.lst >& nul
  88. %keystackpath >& nul
  89.  
  90. %cursor_off
  91. break off
  92. pushd
  93.  
  94. attrib -h descript.ion >& nul
  95. echo %_cwd > %prcssdir
  96. gosub copydesc
  97.  
  98. set sp2=
  99. set fp2=
  100.  
  101. :home
  102.  
  103. cls
  104. set fp=-1
  105. set sp=0
  106.  
  107. iff  "%sp2" ne ""  then
  108.   set fp=%@eval[%fp2-10]
  109.   set sp=%@eval[%sp2-10]
  110.   set fp2=
  111.   set sp2=
  112. else
  113.   set numdown=0
  114. endiff
  115.  
  116. iff  exist *.*  then
  117.   dir /b > %dirlst
  118. else
  119.   scrput 7 5 bri gre on blu There are no files in this directory :-(
  120.   gosub drawboxes
  121.   goto chgdir
  122. endiff
  123. gosub drawboxes
  124. gosub stats
  125.  
  126. :loop
  127.  
  128. set fp=%@eval[%fp+1]
  129. set sp=%@eval[%sp+1]
  130.  
  131. iff  %@line[%dirlst,%fp] ne **EOF**  then
  132. scrput %@eval[%sp+5] 5  bri whi on blu %@line[%dirlst,%fp]
  133. scrput %@eval[%sp+5] 20 bri gre on blu %@filedate[%@line[%dirlst,%fp]]
  134. scrput %@eval[%sp+5] 30 bri mag on blu %@filesize[%@line[%dirlst,%fp],b]
  135. scrput %@eval[%sp+5] 39 bri blu on blu %@descript[%@line[%dirlst,%fp]]
  136. endiff
  137.  
  138. if  %@eval[%sp %% 10] eq 0  gosub getfile
  139. goto loop
  140.  
  141. :getfile
  142.  
  143. gosub drawboxes
  144.  
  145. scrput 5 6  whi on blu 
  146. scrput 16 6 whi on blu 
  147. scrput 16 7 mag on blu %numdown
  148. set lineoflst=%@substr[%@select[%@search[%menusel],4,0,23,2],1,2]
  149.  
  150. if  "%lineoflst" eq ""  goto chgdir
  151.  
  152. iff  %lineoflst eq D  then
  153.   iff  %@line[%dirlst,%@eval[%fp+1]] ne **EOF**  then
  154.     beep 400 1
  155.     beep 500 1
  156.     set sp=0
  157.     set numdown=%@eval[%numdown+1]
  158.   else
  159.     goto getfile
  160.   endiff
  161.  
  162.   cls
  163.   gosub drawboxes
  164.   gosub stats
  165.   return
  166. elseiff %lineoflst eq u then
  167.   if %@lines[%dirlst] lt 11 gosub getfile
  168.   if %fp lt 11 goto getfile
  169.   beep
  170.   set sp=0
  171.   set fp=%@eval[%fp-20]
  172.   set numdown=%@eval[%numdown-1]
  173.  
  174.   cls
  175.   gosub drawboxes
  176.   gosub stats
  177.   return
  178. else
  179.   goto describethis
  180. endiff
  181.  
  182. :chgdir
  183.  
  184. drawbox 17 4 23 79 %boxstyle cyn on blu
  185. gosub clrstatbox
  186. scrput 18 5 whi on blu working ...
  187. echo .  >%dirlst
  188.  
  189. if  %@len[%_cwds] ne 3  echo .. >> %dirlst
  190. dir /ad /b >&> nul >> %dirlst
  191.  
  192. REM ************* Put as many drives and directories as you wish ! ***********
  193. REM ************* Without any trailing backslash ! We warned you ! ***********
  194.  
  195. echo a: >> %dirlst
  196. echo b: >> %dirlst
  197. echo c: >> %dirlst
  198. echo d: >> %dirlst
  199. echo c:\download >> %dirlst
  200. echo c:\upload   >> %dirlst
  201.  
  202. set isitadir=%@select[%dirlst,18,7,22,79, Please select the directory you wish to change to: ]
  203.  
  204. if  "%isitadir" eq ""  goto out
  205.  
  206. iff  isdir %isitadir  then
  207.   echo %@full[%isitadir] >> %prcssdir
  208.   *cdd %isitadir
  209.   gosub copydesc
  210.   goto home
  211. elseiff  %isitadir eq quit  then
  212.   goto out
  213. else
  214.   goto chgdir
  215. endiff
  216.  
  217. :describethis
  218.  
  219. iff  %@line[%dirlst,%@eval[%fp-(9-%lineoflst)]] ne **EOF**  then
  220.   drawbox 17 4 23 79 %boxstyle whi on blu
  221.   scrput 19 5 cya on blu %@line[%dirlst,%@eval[%fp-(9-%lineoflst)]]
  222.   keystack "%@descript[%@line[%dirlst,%@eval[%fp-(9-%lineoflst)]]]"
  223. endiff
  224.  
  225.  
  226. :reask
  227.  
  228. scrput 20 19 bri cya on blu └────────────────────────────────────────┘
  229. screen 19 20
  230. %cursor_on
  231. input %%newdes
  232. %cursor_off
  233.  
  234. iff  %@len[%newdes] gt 40  then
  235.   keystack "%newdes"
  236.   goto reask
  237.   iff  "%newdes" ne ""  then
  238.     :descentered
  239.  
  240.     describe %@line[%dirlst,%@eval[%fp-(9-%lineoflst)]] ""
  241.     echo %newdes | describe %@line[%dirlst,%@eval[%fp-(9-%lineoflst)]] > nul
  242.     set Keystacklist=@80 @80 @80 @80 @80 @80 @80 @80 @80 @80 @80 @80 
  243.     set Keystacklist=%@substr[%Keystacklist,0,%@eval[%lineoflst *4 + 4]]
  244.     keystack %Keystacklist
  245.     set sp2=%sp
  246.     set fp2=%fp
  247.     goto home
  248.   else
  249.     set newdes=%@select[%@search[%desclist],18,8,21,80,Please Select a Description Among These !]
  250.     if  "%newdes" eq ""  set newdes=Not Described Yet !
  251.       goto descentered
  252.   endiff
  253. else
  254.   goto out
  255. endiff
  256.  
  257. set sp2=%sp
  258. set fp2=%fp
  259. goto home
  260.  
  261. :drawboxes
  262.  
  263. drawbox 5 4 16 79 %boxstyle bri whi on blu
  264. scrput 0 4  bri yel on blu ≡       DESCBTM v1.0 (C) 1992 
  265. scrput 0 34 bri cya on blu FM
  266. scrput 0 36 bri yel on blu MO
  267. scrput 0 38 bri yel on blu  Publications Informatiques Enr.         ≡
  268. drawhline 1 4 76 1 cya on blu
  269. return
  270.  
  271. :stats
  272.  
  273. scrput 2  5 bri cya on blu current directory is :
  274. scrput 2 28 bri yel on blu %_CWD
  275. scrput 3  5 bri whi on blu environment used     :
  276. scrput 3 28 bri gre on blu %@eval[%totalenv-%_env]
  277. scrput 3 34 bri whi on blu bytes
  278. scrput 4  5 bri whi on blu number of entries    :
  279. scrput 4 28 bri red on blu %@eval[%@lines[%dirlst]+1]
  280. scrput 4 34 bri whi on blu entrie(s)
  281. return
  282.  
  283. :savemods
  284.  
  285. set counter=0
  286.  
  287. :loop2
  288.  
  289. if "%counter" gt "%@lines[%prcssdir]" return
  290.  
  291. *attrib -h %@line[%prcssdir,%counter]\descript.ion >& nul
  292. *attrib -h %@line[%prcssdir,%counter]\descript.bak >& nul
  293.  
  294. if  "%@filesize[%@line[%prcssdir,%counter]\descript.ion]" ne "%@filesize[%@line[%prcssdir,%counter]\descript.bak]"  gosub modified
  295.  
  296. set counter=%@eval[%counter+1]
  297. goto loop2
  298. return
  299.  
  300. :modified
  301.  
  302. iff  "%autosave"="yes"  then
  303.   del /y %@line[%prcssdir,%counter]\descript.bak >& nul
  304.   return
  305. endiff
  306.  
  307. gosub clrstatbox
  308.  
  309. screen 19 6
  310. echo Descript.ion in %@line[%prcssdir,%counter] was modified !
  311. screen 20 6
  312. inkey /k"YNynQq[esc]" Do you whish to save ([Y]es/[N]o/[Q]uit/[Esc]Save all and exit) : %%answer
  313.  
  314. if %answer eq q goto out2
  315.  
  316. if %answer eq y (
  317.   screen 19 6
  318.   gosub clrstatbox
  319.   echo saving %@line[%prcssdir,%counter]\descript.ion
  320.   del /y %@line[%prcssdir,%counter]\descript.bak >& nul
  321.   return)
  322.  
  323. if %answer eq n (
  324.   copy %@line[%prcssdir,%counter]\descript.bak %@line[%prcssdir,%counter]\descript.ion >& nul
  325.   del /y %@line[%prcssdir,%counter]\descript.bak >& nul
  326.   return)
  327.  
  328. set autosave=yes
  329. gosub clrstatbox
  330. screen 19 6
  331. echo Saving all modified descript.ion files !
  332. return
  333.  
  334. :clrstatbox
  335.  
  336. drawbox 18 5 22 77 0 blu on blu fill blu
  337. return
  338.  
  339. :out
  340.  
  341. scrput 18 5 bri whi on blu working ...
  342. drawbox 17 4 23 79 %boxstyle bri cya on blu
  343. gosub savemods
  344.  
  345. :out2
  346.  
  347. gosub clrstatbox
  348. scrput 19 5 whi on blu [UNREGISTERED EVALUATION COPY]
  349. scrput 20 5 whi on blu Thanks for evaluating FMMO's software !
  350. scrput 21 5 whi on blu Have a nice 4DOS !
  351.  
  352. %cursor_on
  353. popd
  354. screen 23 0
  355. del /yz descript.bak >& nul
  356.  
  357. endlocal
  358. cancel
  359.  
  360. :copydesc
  361.  
  362. copy descript.ion descript.bak >& nul
  363. copy descript.ion descript.bak >& nul
  364. return
  365.  
  366. :notv40
  367.  
  368. echo DESCBTM is constantly updated to use the latest 4DOS functions.
  369. echo As of now, the most recent version of 4DOS is 4.0/rev B1 release.
  370. echo Please read the file magicn.fmo for more information !
  371. quit
  372.  
  373. :not4dos
  374.  
  375. @echo 
  376. @echo 4DOS (tm) is not loaded on your system.
  377. @echo.
  378. @echo Shame on you :-)
  379. @echo.
  380. @echo For DESCBTM to run, 4DOS must be loaded on your system.
  381. @echo.
  382. @echo Feel free to download or request the latest version of 4DOS (tm) JPSoftware
  383. @echo from FMMHOST BBS in Sherbrooke, Qc.
  384. @echo.
  385. @echo Please read magicn.fmo for more information.
  386. @echo.
  387. @echo We are an official 4DOS Distribution Site !
  388.